package com.srit.vgt.controller;

import com.srit.vgt.common.response.Response;
import com.srit.vgt.service.IEcrService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Yyming
 * @version 10.0
 * Created by Yyming on 2021/1/23
 */
@RestController
//@RequestMapping("/")
@Api(tags = "电子秤")
public class EcrController {
    @Autowired
    IEcrService ecrService;

    @GetMapping("/ecr/list/{marketId}")
    public Response getAllEcr(@PathVariable String marketId) {
        return Response.success(ecrService.getAllEcr(marketId));
    }


    @GetMapping("/ecr/tran/{ecrId}")
    public Response getAllEcrTran(@PathVariable String ecrId) {
        return Response.success(ecrService.getAllEcrTran(ecrId));
    }
}
